/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package components;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.HeadlessException;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author havardaxelsen
 */
public class NFrame extends JFrame implements  TableCellRenderer{
    

Dimension dim = new Dimension(1200, 600);
private Color c = new Color(255,255,255,100);

    public NFrame(String name) throws HeadlessException {
        
        this.setTitle(name);
        //this.setBackground(c);
        this.setPreferredSize(dim);
        this.setMinimumSize(dim);
        this.setLocationRelativeTo(null);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
    }
    public Component getTableCellRendererComponent(JTable jtable, Object o, boolean bln, boolean bln1, int i, int i1) {
        this.add( new JTextField( o.toString()  ) );
                this.add( new JButton("+"));
                this.add( new JButton("-"));
                return this;
    
    
    
}
}
